package com.myutil.graph;

import java.util.ArrayList;

public class Route {
	private ArrayList<Node> ls;
	public int length;

	public Route(ArrayList<Node> ls) {
		this.ls = ls;
		length=ls.size();
	}
	
	public boolean addLast(Node point){
		if(point==null) 
			return false;
		ls.add(point);
		length++;
		return true;
	}
	
	public Node remove(int index){
		return ls.remove(index);
	}
	
	public ArrayList<Node> getRoute(){
		return ls;
	}
	
	public void clear() {
		ls.clear();
	}
	
}
